home *** CD-ROM | disk | FTP | other *** search
/ SGI Performance Co-Pilot 1.3 / SGI Performance Co-Pilot 1.3.iso / dist / pcp.idb / usr / share / catman / u_man / cat1 / cron.pmdaily.z / cron.pmdaily
Text File  |  1997-04-03  |  12KB  |  198 lines

  1.  
  2.  
  3.  
  4. CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))                                                CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy, ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk, ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee - administration of
  10.      Performance Co-Pilot archive log files
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy [----cccc _c_o_n_t_r_o_l] [----kkkk _h_o_w_l_o_n_g] [----ssss _s_i_z_e]
  14.      ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk [----cccc _c_o_n_t_r_o_l]
  15.      ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee [----ffff] [_i_n_p_u_t-_b_a_s_e_n_a_m_e ... _o_u_t_p_u_t-_n_a_m_e]
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This series of shell scripts and associated control files may be used to
  19.      create a customized regime of administration and management for
  20.      Performance Co-Pilot (PCP) archive log files.
  21.  
  22.      ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy is intended to be run once per day, preferably in the early
  23.      morning, as soon after midnight as practicable.  Its task is to aggregate
  24.      and rotate one or more sets of PCP archives.  After some period, old PCP
  25.      archives are discarded.  This period is 14 days by default, but may be
  26.      changed using the ----kkkk option. Two special values are recognized for the
  27.      period (_h_o_w_l_o_n_g), namely 0000 to keep no archives beyond the current one,
  28.      and ffffoooorrrreeeevvvveeeerrrr to prevent any archives being discarded.
  29.  
  30.      In addition, if the the PCP ``notices'' file (/_v_a_r/_a_d_m/_p_c_p_l_o_g/_N_O_T_I_C_E_S) is
  31.      larger than 20480 bytes, ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy will rename the file with a
  32.      ``.old'' suffix, and start a new ``notices'' file.  The rotate threshold
  33.      may be changed from 20480 to _s_i_z_e bytes using the ----ssss option.
  34.  
  35.      ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk may be run at any time, and is intended to check that the
  36.      desired set of ppppmmmmllllooooggggggggeeeerrrr(1) processes are running, and if not to re-launch
  37.      any failed loggers.
  38.  
  39.      ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee is a wrapper script for ppppmmmmllllooooggggmmmmeeeerrrrggggeeee(1) that merges all of
  40.      the archive logs matching the _i_n_p_u_t-_b_a_s_e_n_a_m_e arguments, and creates a new
  41.      archive using _o_u_t_p_u_t-_n_a_m_e as the base name for the physical files that
  42.      constitute an archive log.  The _i_n_p_u_t-_b_a_s_e_n_a_m_e arguments may contain meta
  43.      characters in the style of sssshhhh(1).  If specified, the ----ffff option causes all
  44.      of the input files to be removed once the output archive has been
  45.      created.
  46.  
  47.      ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee is used by ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy.
  48.  
  49.      Both ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy and ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk are controlled by a PCP logger control
  50.      file that specifies the parameters of the archive sets to be managed.
  51.      The default control file is /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_t_r_o_l, but an
  52.      alternate may be specified using the ----cccc option.
  53.  
  54.      The control file should be customized according to the following rules.
  55.  
  56.      1.   Lines beginning with a ``#'' are comments.
  57.      2.   Lines beginning with a ``$'' are interpreted as sssshhhh(1) commands, and
  58.           all text following the ``$'' will be eval'ed by the script reading
  59.           the control file.  This is particularly useful to set and export
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))                                                CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
  71.  
  72.  
  73.  
  74.           variables into the environment of the administrative scripts, e.g.
  75.               $ PMCD_CONNECT_TIMEOUT=20; export PMCD_CONNECT_TIMEOUT
  76.      3.   There should be one line in the control file for each archive set.
  77.           At any one time, there will be one ppppmmmmllllooooggggggggeeeerrrr process executing on the
  78.           local host for each archive set.
  79.      4.   Fields within a line of the control file are separated by one or
  80.           more spaces or tabs.
  81.      5.   The _f_i_r_s_t field is the name of the host that is the source of the
  82.           performance metrics for this archive set.
  83.      6.   The _s_e_c_o_n_d field indicates if this is a _p_r_i_m_a_r_y ppppmmmmllllooooggggggggeeeerrrr instance
  84.           (yyyy) or not (nnnn).  Since the primary logger must run on the local
  85.           host, and there may be at most one primary logger for a particular
  86.           host, this field can be yyyy for at most one archive set, in which case
  87.           the host name must be the name of the local host.
  88.      7.   The _t_h_i_r_d field indicates if this ppppmmmmllllooooggggggggeeeerrrr instance needs to be
  89.           started under the control of ppppmmmmssssoooocccckkkkssss(1) to connect to a ppppmmmmccccdddd through
  90.           a firewall (yyyy or nnnn).
  91.      8.   The _f_o_u_r_t_h field is a directory name.  All files associated with
  92.           this archive set will be created in this directory, and this will be
  93.           the current directory for the execution of any programs required in
  94.           the maintenance of this archive set.  A useful convention is that
  95.           primary logger archives for the local host with hostname _m_y_h_o_s_t are
  96.           maintained in the directory /_v_a_r/_a_d_m/_p_c_p_l_o_g/_m_y_h_o_s_t (this is where
  97.           the default ppppmmmmllllooooggggggggeeeerrrr start-up script in ////eeeettttcccc////iiiinnnniiiitttt....dddd////ppppccccpppp will create
  98.           the archives), while archives for the remote host _m_u_m_b_l_e are
  99.           maintained in /_v_a_r/_a_d_m/_p_c_p_l_o_g/_m_u_m_b_l_e.
  100.      9.   All other fields are interpreted as arguments to be passed to
  101.           ppppmmmmllllooooggggggggeeeerrrr(1) and/or ppppmmmmnnnneeeewwwwlllloooogggg(1).  Most typically this would be the ----cccc
  102.           option.
  103.  
  104.      The following sample control lines specify a primary logger on the local
  105.      host (_b_o_z_o), and a non-primary logger to collect and log performance
  106.      metrics from the host _b_o_i_n_g.
  107.  
  108.      bozo   y  n  /var/adm/pcplog/bozo   -c config.default
  109.      boing  n  n  /var/adm/pcplog/boing  -c ./pmlogger.config
  110.  
  111.      Typical ccccrrrroooonnnnttttaaaabbbb(5) entries for periodic execution of ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy and
  112.      ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk are given in /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_r_o_n_t_a_b and shown
  113.      below.  Due to the file permissions involved, these should be added to
  114.      the _c_r_o_n_t_a_b for root if automated PCP archive log maintenance is desired.
  115.  
  116.      # daily processing of archive logs
  117.      10      0       *       *       *       /usr/pcp/bin/cron.pmdaily
  118.      # every 30 minutes, check pmlogger instances are running
  119.      25,55   *       *       *       *       /usr/pcp/bin/cron.pmcheck
  120.  
  121.      The script ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy could be copied and modified to
  122.      implement a site-specific procedure for end-of-week and/or end-of-month
  123.      management for a set of PCP archives.
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))                                                CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
  135.  
  136.  
  137.  
  138. FFFFIIIILLLLEEEESSSS
  139.      /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_t_r_o_l
  140.                                the PCP logger control file
  141.      /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_r_o_n_t_a_b
  142.                                sample crontab for automated script execution
  143.                                by root
  144.      /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_f_i_g._d_e_f_a_u_l_t
  145.                                default ppppmmmmllllooooggggggggeeeerrrr configuration file for the
  146.                                local primary logger
  147.      /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_f_i_g.*
  148.                                other ppppmmmmllllooooggggggggeeeerrrr configuration files suited for
  149.                                particular PCP monitoring tools, add-on
  150.                                products and application environments
  151.      /_v_a_r/_a_d_m/_p_c_p_l_o_g/_h_o_s_t_n_a_m_e  default location for archives of performance
  152.                                information collected from the host _h_o_s_t_n_a_m_e
  153.      /_v_a_r/_a_d_m/_p_c_p_l_o_g/_N_O_T_I_C_E_S   PCP ``notices'' file used by ppppmmmmiiiieeee(1) and
  154.                                friends
  155.  
  156. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  157.      ccccrrrroooonnnn(1), ppppmmmmllllcccc(1), ppppmmmmllllooooggggggggeeeerrrr(1), ppppmmmmllllooooggggmmmmeeeerrrrggggeeee(1), ppppmmmmnnnneeeewwwwlllloooogggg(1) and ppppmmmmssssoooocccckkkkssss(1).
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                                                         PPPPaaaaggggeeee 3333
  194.  
  195.  
  196.  
  197.